package de.jamm.gui;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;

import javax.swing.JTextArea;

public class MiniMap extends JammContent {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private JTextArea miniMap;
	private static MiniMap instance;
	public MiniMap(Dimension d, String title, String iconPath) {
		super(d, title, iconPath);
		instance = this;
		
	}
	@Override
	public void setContent() {
		miniMap = new JTextArea();
		miniMap.setFont(new Font("Lucida Console",Font.BOLD,20));
		miniMap.setForeground(Color.WHITE);
		miniMap.setOpaque(false);
		miniMap.setEditable(false);
		miniMap.setText("0 - - 0 - - 0\n"+
						"| 0 - 0 - 0 |\n"+
						"| | 0 0 0 | |\n"+
						"0 0 0   0 0 0\n"+
						"| | 0 0 0 | |\n"+
						"| 0 - 0 - 0 |\n"+
						"0 - - 0 - - 0");
		miniMap.setRows(8);
		getContentPane().add(miniMap,BorderLayout.CENTER);
	}
	public JTextArea getMiniMap() {
		return miniMap;
	}
	public void setMiniMap(String miniMap) {
		this.miniMap.setText(miniMap);
	}
	public static MiniMap getInstance() {
		return MiniMap.instance;
	}
}
